<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>图书后台管理</title>
	<link rel="stylesheet" type="text/css" href="../static/admin/css/reset.css">
	<link rel="stylesheet" type="text/css" href="../static/admin/css/main.css">
	<link rel="stylesheet" type="text/css" href="../static/admin/css/jquery.pagination.css">
	<script src="../static/admin/js/jquery-1.12.4.min.js"></script>
	<script src="../static/admin/js/jquery.pagination.min.js"></script>
</head>
<body>
	<div class="breadcrub">
			当前位置：分类列表>分类列表管理
    </div><br>
    <div>
			<table class="common_table" style="width: 80%;margin: auto;background: white">
                <tr>
                    <td colspan="4"><a class="addtype"  style="font-size: 20px">分类展示</a><br>
                    <span style="color: red;background: #f1f2f6;font-size: 18px">{{ get_flashed_messages()[0] }}</span>
                        <span style="color: red;background: #f1f2f6;font-size: 18px">{{ get_flashed_messages()[1] }}</span></td>
                </tr>

				<tr style="background: #779ECB">
					<th width="15%" style="font-size: 18px">序号</th>
					<th width="35%" style="font-size: 18px">分类名称</th>
					<th width="15%" style="font-size: 18px">选择修改</th>
					<th width="15%" style="font-size: 18px">选择删除</th>
				</tr>
				{% for i in page.items %}
				<tr>
					<td style="font-size: 14px">{{ per_page*(page_num-1)+loop.index}}</td>
					<td style="font-size: 14px">{{ i.name }}</td>
					<td style="font-size: 14px"><a href="/updatecate/{{ i.id }}">修改</a></td>
					<td style="font-size: 14px"><a href="/deletecate/{{ i.id }}">删除</a></td>
				</tr>
				{% endfor %}

                <tr>
                    <td colspan="4">

                        <a href="/pagelist?page_num={{ prev_num }}">上一页</a>

                        {% for foo in page.iter_pages() %}
                            <a href="/pagelist?page_num={{ foo }}">{{ foo }}</a>
                        {% endfor %}

                        <a href="/pagelist?page_num={{ next_num }}">下一页</a>
                    </td>
                </tr>
			</table>
    </div>
</body>
</html>